package com.ljxt.dt.dao.storemanagementdao.impl;

import com.ljxt.dt.dao.storemanagementdao.WareHouseDao;
import com.ljxt.dt.domain.Shelves;
import com.ljxt.dt.domain.Warehouse;
import com.ljxt.dt.util.DaoUtil;

import java.util.List;

/**
 * @author 唐春劲
 * @version 1.0.0
 * @date 2020-05-19 15:37
 * @copyright 老九学堂
 */

public class WareHouseDaoImpl implements WareHouseDao {
    @Override
    public List<Warehouse> selectWare() {
        return DaoUtil.querySelectAll(new Warehouse());
    }

    @Override
    public List<Shelves> selectShelves(Integer id) {
        String sql = "select * from shelves where warehouse_id = ? and state_id = 1";

        return DaoUtil.querySelectAll(sql,new Shelves(),id) ;
    }
}
